FROM openjdk:11
#设置工作环境
ENV APP_HOME=/apps
#进入创建好的目录
WORKDIR $APP_HOME
#拷贝项目
COPY target/daily-first-demo.jar /home/apps/daily-first-demo.jar
#文件赋权限
RUN chmod +x /home/apps/daily-first-demo.jar
# set timezone
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
#打印
RUN echo 'Asia/Shanghai' >/etc/timezone
# set end
CMD ["java","-jar","-Xmx100m","/home/apps/daily-first-demo.jar"]